@using umbraco.MacroEngines
@inherits DynamicNodeContext
@{
    var parent = @Model.AncestorOrSelf(2);
    <div class="secondaryNav">
        <h3>@parent.Name</h3>
        <ul>
		@foreach (var item in parent.Children.Where("Visible"))
        {
            var selected = Array.IndexOf(Model.Path.Split(','), item.Id.ToString()) >= 0 ? " class=\"selected\"" : string.Empty;
            <li@Html.Raw(selected)><a href="@item.Url"><span>@item.Name</span></a></li>
        }
        </ul>
    </div>
}
